home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1996 June
/
MACPOWER-1996-06.ISO.7z
/
MACPOWER-1996-06.ISO
/
Apple関連
/
OpenDoc J-1.0
/
3rd Party Components
/
Attachmate CyberTerm
/
_SOM_
/
som_CyberTermInit.cpp
< prev
next >
Wrap
Text File
|
1995-12-04
|
2KB
|
108 lines
/*
File: som_CyberTermInit.cpp
Contains: CFM Library init routines for CyberTerm
Written by: Steve Smith
Copyright: ゥ 1995 by Apple Computer, Inc., all rights reserved.
*/
// -- Compiler/Preprocessor Switches --
#ifndef _COMPILERDEFS_
#include "CompDefs.h"
#endif
// -- OpenDoc Utilities --
#ifndef _EXCEPT_
// Exceptions define several important macros (ie. CHECKENV)
// which are used in the SOM method dispatch glue. If Except.h
// is not included early enough, exceptions may not be thrown
// correctly when returning from a SOM method with "ev" parameter set.
#include <Except.h>
#endif
// -- SOM Includes --
#ifndef som_xh
#include <som.xh>
#endif
#ifndef SOM_SOMObject_xh
#include <somobj.xh>
#endif
// -- CyberTerm Includes --
#ifndef SOM_CyberSample_som_CyberTerm_xh
#include "som_CyberTerm.xh"
#endif
// -- OpenDoc Utilities --
#ifndef _USERSRCM_
#include <UseRsrcM.h>
#endif
#ifndef _ODMEMORY_
#include <ODMemory.h>
#endif
// -- MacToolbox Includes --
#ifndef __CODEFRAGMENTS__
#include <CodeFragments.h>
#endif
#pragma segment somCyberTermInit
//------------------------------------------------------------------------------
// Prototypes
//------------------------------------------------------------------------------
extern "C" pascal OSErr CyberTermCFMInit(CFragInitBlockPtr initBlkPtr);
extern "C" void SOMLINK CyberTermSOMInit( SOMObject *somSelf );
//------------------------------------------------------------------------------
// Functions
//------------------------------------------------------------------------------
extern "C" pascal OSErr CyberTermCFMInit(CFragInitBlockPtr initBlkPtr)
{
// We are using OpenDoc's memory mgmt calls, so we must
// initialize the interface to the memory manager.
OSErr err1 = InitODMemory();
// We must also capture the relevant information about
// our library file so that we may access our resources.
OSErr err2 = InitLibraryResources(initBlkPtr);
// DebugStr("¥pCyberTerm CFM Init!");
#if ODDebug
// DEBUG - drop into debugger if button down when lib loaded.
if ( Button() ) DebugStr("¥p");
#endif
return (OSErr) (err1 != noErr) ? err1 : err2;
}
extern "C" void SOMLINK CyberTermSOMInit( SOMObject *somSelf )
{
#if ODDebug
// DEBUG - drop into debugger if button down when lib loaded.
if ( Button() ) DebugStr("¥p");
#endif
return;
}